<%--
 *  File:    ProdSummary.jsp
 *  @Author: Langerwang
 *  Date:    2001/01/14
 *  @Modifier: Jamesli
 *  Date:    2011/01/12
 *
 *  Copyright (C) 2000 - 2011 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.OvalLabel" %>
<%@ page import="com.oval.util.OvalCustomMessage" %>
<%@ page import="com.oval.util.OvalCustomColumn" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="http://dcms.oval.com/page/dcms" prefix="dcms" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.ProdSummary");
  String privilegeCode = "10203,L203";
  String strTableName = "ovproduct";
  String strModuleName = "PCM";
%>

<%
  if(request.getParameter("orgid") != null)
  {
    session.setAttribute("orgidsession",new Integer(request.getParameter("orgid")));
  }
  if(request.getParameter("categoryorgid") != null && request.getParameter("categoryorgid") != "")
  {
    session.setAttribute("categoryorgidsession",new Integer(request.getParameter("categoryorgid")));
  }
  //in order 2 get parameter
  
  if(request.getParameter("categoryid") != null && request.getParameter("categoryid") != "")
  {
    session.setAttribute("categoryid",new Integer(request.getParameter("categoryid")));
  }
  
  
  //session.removeAttribute("selectoptsession");
  //if(request.getParameter("selectopt") != null)
  //{
  //  session.setAttribute("selectoptsession",request.getParameter("selectopt"));
  //}
  if(request.getParameter("ownerid") != null)
  {
    session.setAttribute("owneridsession",new Integer(request.getParameter("ownerid")));
  }

  Integer nOrgId = (Integer)session.getAttribute("orgidsession");
  Integer nCategoryOrgId = (Integer)session.getAttribute("categoryorgidsession");
  String strOpt = (String)session.getAttribute("selectoptsession");
  Integer nOwnerId=new Integer(-1);
  if(session.getAttribute("owneridsession")!=null)
  {
       nOwnerId = (Integer)session.getAttribute("owneridsession");
  }
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@include file="/inc/Print.inc"%>
<%@ include file="/inc/NewCalendar.inc" %>
<html>
<head>
<title>ProdSummary</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/summary.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="../../js/ScriptLib.js"></script>
<script language="JavaScript" src="../../js/FuncLib.js"></script>


<%@ include file="/rpt/ReportURL.inc"%>
<script>
function page_export(){
	var searchname = document.prodsummaryform.searchname.value;
	var searchvalue = document.prodsummaryform.searchvalue.vlaue;
	var languagecode = document.prodsummaryform.languagecode.value;
	var url = "<%=reportURL%>/servlet/ExcecuteReport/ExportProdmain.sox?__folder=/ovalreport&sessionid=<%=session.getId()%>&languagecode=" + languagecode;
	if(searchvalue != "" && searchvalue != null){
		url += "&" + searchname + "=" + searchvalue;
	}
	var strstatus="height=768, width=1024,top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
    popwindow = window.open(url, "nwindow", strstatus);
}

function Execcd_export(){

	//window.open("<%=reportURL %>/servlet/ExcecuteReport/PordSummary.sox?__format=xlsx&__folder=/ovalreport");

	var url = "<%=reportURL%>/servlet/ExcecuteReport/ProdSummary.sox?__format=xlsx&__folder=/ovalreport"
    var strstatus="height=768, width=1024,top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
   
    popwindow = window.open(url, "n1window", strstatus);



}
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<dcms:summary id="pcm.prodsummary" needNew="true" needEdit="true" needDelete="true" summaryDataName="productsummary">


  <dcms:param name="categoryid" property="params:categoryid"/>
  <dcms:param name="orgid" property="session:orgidsession"/>
  <dcms:param name="selectopt" property="params:selectopt"/>
    
  <dcms:summaryAction actionFuction="Execcd_export"  labelCode="L_Execcd" styleWidth="70" />
      
  <dcms:summaryTab id="mainTab" labelCode="L_Summary" href="/masterdata/pcm/ProdEditMain.jsp?languagecode={session:userinfo.languagecode}&orgid={session:userinfo.orgid}&categoryid={params:categoryid}"/>
  <dcms:summaryTab id="priceTab" labelCode="L_PriceInfo" href="/masterdata/pcm/ProdPriceInfo.jsp"/>  
   
</dcms:summary> 
</body>
</html>
 

